Features of intra block copy prediction mode for video and image coding and decoding

ABSTRACT

Innovations in intra block copy (“BC”) prediction mode facilitate intra BC prediction that is more effective in terms of rate-distortion performance and/or computational efficiency of encoding and decoding. For example, some of the innovations provide ways to select block vector (“BV”) values more effectively. Other innovations provide ways to encode/decode BV values more efficiently. Still other innovations address how to perform in-loop deblock filtering when a block has intra BC prediction mode, or address how to perform intra BC prediction when constrained intra prediction is enabled.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 15/025,128, filed Mar. 25, 2016, which is the U.S. National Stage of International App. No. PCT/CN2013/085165, filed Oct. 14, 2013, which was published in English under PCT Article 21(2), and which is incorporated by reference herein in its entirety.

BACKGROUND

Engineers use compression (also called source coding or source encoding) to reduce the bit rate of digital video. Compression decreases the cost of storing and transmitting video information by converting the information into a lower bit rate form. Decompression (also called decoding) reconstructs a version of the original information from the compressed form. A “codec” is an encoder/decoder system.

Over the last two decades, various video codec standards have been adopted, including the ITU-T H.261, H.262 (MPEG-2 or ISO/IEC 13818-2), H.263 and H.264 (MPEG-4 AVC or ISO/IEC 14496-10) standards, the MPEG-1 (ISO/IEC 11172-2) and MPEG-4 Visual (ISO/IEC 14496-2) standards, and the SMPTE 421M standard. More recently, the HEVC standard (ITU-T H.265 or ISO/IEC 23008-2) has been approved. Extensions to the HEVC standard (e.g., for scalable video coding/decoding, for coding/decoding of video with higher fidelity in terms of sample bit depth or chroma sampling rate, or for multi-view coding/decoding) are currently under development. A video codec standard typically defines options for the syntax of an encoded video bitstream, detailing parameters in the bitstream when particular features are used in encoding and decoding. In many cases, a video codec standard also provides details about the decoding operations a decoder should perform to achieve conforming results in decoding. Aside from codec standards, various proprietary codec formats define other options for the syntax of an encoded video bitstream and corresponding decoding operations.

Intra block copy (“BC”) is a prediction mode under consideration for HEVC extensions. For intra BC prediction mode, the sample values of a current block of a picture are predicted using previously reconstructed sample values in the same picture. A block vector (“BV”) indicates a displacement from the current block to a region of the picture that includes the previously reconstructed sample values used for prediction. The BV is signaled in the bitstream. Intra BC prediction is a form of intra-picture prediction—intra BC prediction for a block of a picture does not use any sample values other than sample values in the same picture.

As currently specified in the HEVC standard and implemented in some reference software for the HEVC standard, intra BC prediction mode has several problems. For example, intra BC prediction mode is not effectively integrated with various features of the HEVC standard, such as options for frequency transforms/inverse frequency transforms, in-loop deblock filtering and constrained intra prediction. The process of selecting BV values is not effectively constrained, and encoding of BV values is inefficient in terms of bit rate utilization.

SUMMARY

In summary, the detailed description presents innovations in intra block copy (“BC”) prediction mode. For example, some of the innovations provide ways to select block vector (“BV”) values more effectively. Other innovations provide ways to encode/decode BV values more efficiently. Still other innovations address how to perform in-loop deblock filtering when a block has intra BC prediction mode, or address how to perform intra BC prediction when constrained intra prediction is enabled. These innovations can facilitate intra BC prediction that is more effective in terms of rate-distortion performance and/or computational efficiency of encoding and decoding.

The innovations for intra BC prediction mode can be implemented as part of a method, as part of a computing device adapted to perform the method or as part of a tangible computer-readable media storing computer-executable instructions for causing a computing device to perform the method. The various innovations can be used in combination or separately.

The foregoing and other objects, features, and advantages of the invention will become more apparent from the following detailed description, which proceeds with reference to the accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an example computing system in which some described embodiments can be implemented.

FIGS. 2a and 2b are diagrams of example network environments in which some described embodiments can be implemented.

FIG. 3 is a diagram of an example encoder system in conjunction with which some described embodiments can be implemented.

FIG. 4 is a diagram of an example decoder system in conjunction with which some described embodiments can be implemented.

FIGS. 5a and 5b are diagrams illustrating an example video encoder in conjunction with which some described embodiments can be implemented.

FIG. 6 is a diagram illustrating an example video decoder in conjunction with which some described embodiments can be implemented.

FIG. 7 is diagram illustrating intra BC prediction for a block of a picture.

FIG. 8 is a diagram illustrating example constraints on search range for BV values.

FIG. 9 is a flowchart illustrating a generalized technique for encoding with an intra BC prediction mode, subject to one or more constraints on selection of BV values.

FIG. 10 is a diagram illustrating example z-scan order for blocks of a picture.

FIGS. 11a and 11b are diagrams illustrating regions with unreconstructed sample values to be replaced by fill-in values.

FIG. 12 is a flowchart illustrating a generalized technique for using intra BC prediction mode during encoding or decoding when constrained intra prediction can be enabled.

FIG. 13 is a diagram illustrating example constraints on allowable BV values when constrained intra prediction is enabled.

FIG. 14 is a table illustrating an example approach to disabling intra BC prediction mode when constrained intra prediction is enabled.

FIGS. 15a and 15b are diagrams illustrating example ranges of BV values having properties that can be exploited in encoding.

FIGS. 16 and 17 are flowcharts illustrating generalized techniques for encoding and decoding, respectively, of BV values.

FIGS. 18 and 19 are flowcharts illustrating generalized techniques for encoding and decoding, respectively, using an intra BC prediction mode and alternative forward (or inverse) frequency transforms.

FIG. 20 is a diagram illustrating example rules for changing an approach to in-loop deblock filtering depending on prediction modes of blocks.

FIG. 21 is a flowchart illustrating a generalized technique for in-loop deblock filtering during encoding or decoding for blocks having intra BC prediction mode.

DETAILED DESCRIPTION

The detailed description presents innovations in the use of intra block copy (“BC”) prediction mode during encoding and/or decoding. In particular, the detailed description presents innovations for selection of block vector (“BV”) values, encoding/decoding of BV values, integration of intra BC prediction mode with constrained intra prediction, selection of forward and inverse frequency transforms when intra BC prediction mode has been used, and in-loop deblock filtering across a boundary of blocks with intra BC prediction mode.

Although operations described herein are in places described as being performed by a video encoder or video decoder, in many cases the operations can be performed by another type of media processing tool (e.g., image encoder, image decoder).

Some of the innovations described herein are illustrated with reference to syntax elements and operations specific to the HEVC standard. For example, reference is made to the draft version JCTVC-N1005 of the HEVC standard—“High Efficiency Video Coding (HEVC) Range Extensions Text Specification: Draft 4,” JCTVC-N1005, July 2013. The innovations described herein can also be implemented for other standards or formats.

More generally, various alternatives to the examples described herein are possible. For example, some of the methods described herein can be altered by changing the ordering of the method acts described, by splitting, repeating, or omitting certain method acts, etc. The various aspects of the disclosed technology can be used in combination or separately. Different embodiments use one or more of the described innovations. Some of the innovations described herein address one or more of the problems noted in the background. Typically, a given technique/tool does not solve all such problems.

I. Example Computing Systems.

FIG. 1 illustrates a generalized example of a suitable computing system (100) in which several of the described innovations may be implemented. The computing system (100) is not intended to suggest any limitation as to scope of use or functionality, as the innovations may be implemented in diverse general-purpose or special-purpose computing systems.

With reference to FIG. 1, the computing system (100) includes one or more processing units (110, 115) and memory (120, 125). The processing units (110, 115) execute computer-executable instructions. A processing unit can be a general-purpose central processing unit (“CPU”), processor in an application-specific integrated circuit (“ASIC”) or any other type of processor. In a multi-processing system, multiple processing units execute computer-executable instructions to increase processing power. For example, FIG. 1 shows a central processing unit (110) as well as a graphics processing unit or co-processing unit (115). The tangible memory (120, 125) may be volatile memory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of the two, accessible by the processing unit(s). The memory (120, 125) stores software (180) implementing one or more innovations for intra BC prediction mode, in the form of computer-executable instructions suitable for execution by the processing unit(s).

A computing system may have additional features. For example, the computing system (100) includes storage (140), one or more input devices (150), one or more output devices (160), and one or more communication connections (170). An interconnection mechanism (not shown) such as a bus, controller, or network interconnects the components of the computing system (100). Typically, operating system software (not shown) provides an operating environment for other software executing in the computing system (100), and coordinates activities of the components of the computing system (100).

The tangible storage (140) may be removable or non-removable, and includes magnetic disks, magnetic tapes or cassettes, CD-ROMs, DVDs, or any other medium which can be used to store information and which can be accessed within the computing system (100). The storage (140) stores instructions for the software (180) implementing one or more innovations for intra BC prediction mode.

The input device(s) (150) may be a touch input device such as a keyboard, mouse, pen, or trackball, a voice input device, a scanning device, or another device that provides input to the computing system (100). For video, the input device(s) (150) may be a camera, video card, TV tuner card, or similar device that accepts video input in analog or digital form, or a CD-ROM or CD-RW that reads video samples into the computing system (100). The output device(s) (160) may be a display, printer, speaker, CD-writer, or another device that provides output from the computing system (100).

The communication connection(s) (170) enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions, audio or video input or output, or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media can use an electrical, optical, RF, or other carrier.

The innovations can be described in the general context of computer-readable media. Computer-readable media are any available tangible media that can be accessed within a computing environment. By way of example, and not limitation, with the computing system (100), computer-readable media include memory (120, 125), storage (140), and combinations of any of the above.

The innovations can be described in the general context of computer-executable instructions, such as those included in program modules, being executed in a computing system on a target real or virtual processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing system.

The terms “system” and “device” are used interchangeably herein. Unless the context clearly indicates otherwise, neither term implies any limitation on a type of computing system or computing device. In general, a computing system or computing device can be local or distributed, and can include any combination of special-purpose hardware and/or general-purpose hardware with software implementing the functionality described herein.

The disclosed methods can also be implemented using specialized computing hardware configured to perform any of the disclosed methods. For example, the disclosed methods can be implemented by an integrated circuit (e.g., an ASIC (such as an ASIC digital signal process unit (“DSP”), a graphics processing unit (“GPU”), or a programmable logic device (“PLD”), such as a field programmable gate array (“FPGA”)) specially designed or configured to implement any of the disclosed methods.

For the sake of presentation, the detailed description uses terms like “determine” and “use” to describe computer operations in a computing system. These terms are high-level abstractions for operations performed by a computer, and should not be confused with acts performed by a human being. The actual computer operations corresponding to these terms vary depending on implementation.

II. Example Network Environments.

FIGS. 2a and 2b show example network environments (201, 202) that include video encoders (220) and video decoders (270). The encoders (220) and decoders (270) are connected over a network (250) using an appropriate communication protocol. The network (250) can include the Internet or another computer network.

In the network environment (201) shown in FIG. 2a , each real-time communication (“RTC”) tool (210) includes both an encoder (220) and a decoder (270) for bidirectional communication. A given encoder (220) can produce output compliant with a variation or extension of the HEVC standard, SMPTE 421M standard, ISO-IEC 14496-10 standard (also known as H.264 or AVC), another standard, or a proprietary format, with a corresponding decoder (270) accepting encoded data from the encoder (220). The bidirectional communication can be part of a video conference, video telephone call, or other two-party communication scenario. Although the network environment (201) in FIG. 2a includes two real-time communication tools (210), the network environment (201) can instead include three or more real-time communication tools (210) that participate in multi-party communication.

A real-time communication tool (210) manages encoding by an encoder (220). FIG. 3 shows an example encoder system (300) that can be included in the real-time communication tool (210). Alternatively, the real-time communication tool (210) uses another encoder system. A real-time communication tool (210) also manages decoding by a decoder (270). FIG. 4 shows an example decoder system (400), which can be included in the real-time communication tool (210). Alternatively, the real-time communication tool (210) uses another decoder system.

In the network environment (202) shown in FIG. 2b , an encoding tool (212) includes an encoder (220) that encodes video for delivery to multiple playback tools (214), which include decoders (270). The unidirectional communication can be provided for a video surveillance system, web camera monitoring system, remote desktop conferencing presentation or other scenario in which video is encoded and sent from one location to one or more other locations. Although the network environment (202) in FIG. 2b includes two playback tools (214), the network environment (202) can include more or fewer playback tools (214). In general, a playback tool (214) communicates with the encoding tool (212) to determine a stream of video for the playback tool (214) to receive. The playback tool (214) receives the stream, buffers the received encoded data for an appropriate period, and begins decoding and playback.

FIG. 3 shows an example encoder system (300) that can be included in the encoding tool (212). Alternatively, the encoding tool (212) uses another encoder system. The encoding tool (212) can also include server-side controller logic for managing connections with one or more playback tools (214). FIG. 4 shows an example decoder system (400), which can be included in the playback tool (214). Alternatively, the playback tool (214) uses another decoder system. A playback tool (214) can also include client-side controller logic for managing connections with the encoding tool (212).

III. Example Encoder Systems.

FIG. 3 is a block diagram of an example encoder system (300) in conjunction with which some described embodiments may be implemented. The encoder system (300) can be a general-purpose encoding tool capable of operating in any of multiple encoding modes such as a low-latency encoding mode for real-time communication, transcoding mode, and regular encoding mode for media playback from a file or stream, or it can be a special-purpose encoding tool adapted for one such encoding mode. The encoder system (300) can be implemented as an operating system module, as part of an application library or as a standalone application. Overall, the encoder system (300) receives a sequence of source video frames (311) from a video source (310) and produces encoded data as output to a channel (390). The encoded data output to the channel can include content encoded using intra BC prediction mode.

The video source (310) can be a camera, tuner card, storage media, or other digital video source. The video source (310) produces a sequence of video frames at a frame rate of; for example, 30 frames per second. As used herein, the term “frame” generally refers to source, coded or reconstructed image data. For progressive video, a frame is a progressive video frame. For interlaced video, in example embodiments, an interlaced video frame is de-interlaced prior to encoding. Alternatively, two complementary interlaced video fields are encoded as an interlaced video frame or separate fields. Aside from indicating a progressive video frame, the term “frame” or “picture” can indicate a single non-paired video field, a complementary pair of video fields, a video object plane that represents a video object at a given time, or a region of interest in a larger image. The video object plane or region can be part of a larger image that includes multiple objects or regions of a scene.

An arriving source frame (311) is stored in a source frame temporary memory storage area (320) that includes multiple frame buffer storage areas (321, 322, . . . , 32 n). A frame buffer (321, 322, etc.) holds one source frame in the source frame storage area (320). After one or more of the source frames (311) have been stored in frame buffers (321, 322, etc.), a frame selector (330) periodically selects an individual source frame from the source frame storage area (320). The order in which frames are selected by the frame selector (330) for input to the encoder (340) may differ from the order in which the frames are produced by the video source (310), e.g., a frame may be ahead in order, to facilitate temporally backward prediction. Before the encoder (340), the encoder system (300) can include a pre-processor (not shown) that performs pre-processing (e.g., filtering) of the selected frame (331) before encoding. The pre-processing can also include color space conversion into primary and secondary components for encoding. Typically, before encoding, video has been converted to a color space such as YUV, in which sample values of a luma (Y) component represent brightness or intensity values, and sample values of chroma (U, V) components represent color-difference values. The chroma sample values may be sub-sampled to a lower chroma sampling rate (e.g., for YUV 4:2:0 format), or the chroma sample values may have the same resolution as the luma sample values (e.g., for YUV 4:4:4 format). Or, the video can be encoded in another format (e.g., RGB 4:4:4 format).

The encoder (340) encodes the selected frame (331) to produce a coded frame (341) and also produces memory management control operation (“MMCO”) signals (342) or reference picture set (“RPS”) information. If the current frame is not the first frame that has been encoded, when performing its encoding process, the encoder (340) may use one or more previously encoded/decoded frames (369) that have been stored in a decoded frame temporary memory storage area (360). Such stored decoded frames (369) are used as reference frames for inter-frame prediction of the content of the current source frame (331). Generally, the encoder (340) includes multiple encoding modules that perform encoding tasks such as partitioning into tiles, intra prediction estimation and prediction, motion estimation and compensation, frequency transforms, quantization and entropy coding. The exact operations performed by the encoder (340) can vary depending on compression format. The format of the output encoded data can be a variation or extension of HEVC format, Windows Media Video format, VC-1 format, MPEG-x format (e.g., MPEG-1, MPEG-2, or MPEG-4), H.26x format (e.g., H.261, H.262, H.263, H.264), or another format.

The encoder (340) can partition a frame into multiple tiles of the same size or different sizes. For example, the encoder (340) splits the frame along tile rows and tile columns that, with frame boundaries, define horizontal and vertical boundaries of tiles within the frame, where each tile is a rectangular region. Tiles are often used to improve options for parallel processing. A frame can also be organized as one or more slices, where a slice can be an entire frame or region of the frame. A slice can be decoded independently of other slices in a frame, which improves error resilience. The content of a slice or tile is further partitioned into blocks or other sets of samples for purposes of encoding and decoding.

For syntax according to the HEVC standard, the encoder splits the content of a frame (or slice or tile) into coding tree units. A coding tree unit (“CTU”) includes luma sample values organized as a luma coding tree block (“CTB”) and corresponding chroma sample values organized as two chroma CTBs. The size of a CTU (and its CTBs) is selected by the encoder, and can be, for example, 64×64, 32×32 or 16×16 sample values. A CTU includes one or more coding units. A coding unit (“CU”) has a luma coding block (“CB”) and two corresponding chroma CBs. For example, a CTU with a 64×64 luma CTB and two 64×64 chroma CTBs (YUV 4:4:4 format) can be split into four CUs, with each CU including a 32×32 luma CB and two 32×32 chroma CBs, and with each CU possibly being split further into smaller CUs. Or, as another example, a CTU with a 64×64 luma CTB and two 32×32 chroma CTBs (YUV 4:2:0 format) can be split into four CUs, with each CU including a 32×32 luma CB and two 16×16 chroma CBs, and with each CU possibly being split further into smaller CUs. The smallest allowable size of CU (e.g., 8×8, 16×16) can be signaled in the bitstream.

Generally, a CU has a prediction mode such as inter or intra. A CU includes one or more prediction units for purposes of signaling of prediction information (such as prediction mode details, displacement values, etc.) and/or prediction processing. A prediction unit (“PU”) has a luma prediction block (“PB”) and two chroma PBs. For an intra-predicted CU, the PU has the same size as the CU, unless the CU has the smallest size (e.g., 8×8). In that case, the CU can be split into four smaller PUs (e.g., each 4×4 if the smallest CU size is 8×8) or the PU can have the smallest CU size, as indicated by a syntax element for the CU. A CU also has one or more transform units for purposes of residual coding/decoding, where a transform unit (“TU”) has a transform block (“TB”) and two chroma TBs. A PU in an intra-predicted CU may contain a single TU (equal in size to the PU) or multiple TUs. As used herein, the term “block” can indicate a CB, PB, TB or other set of sample values, depending on context. The encoder decides how to partition video into CTUs, CUs, PUs, TUs, etc.

Returning to FIG. 3, the encoder represents an intra-coded block of a source frame (331) in terms of prediction from other, previously reconstructed sample values in the frame (331). For intra BC prediction, an intra-picture estimator estimates displacement of a block with respect to the other, previously reconstructed sample values. An intra-prediction reference region is a region of samples in the frame that are used to generate BC-prediction values for the block. For intra spatial prediction for a block, the intra-picture estimator estimates extrapolation of the neighboring reconstructed sample values into the block. The intra-prediction estimator outputs prediction information (such as block vector (“BV”) values for intra BC prediction and prediction mode (direction) for intra spatial prediction), which is entropy coded. An intra-prediction predictor applies the prediction information to determine intra prediction values.

The encoder (340) represents an inter-coded, predicted block of a source frame (331) in terms of prediction from reference frames. A motion estimator estimates motion of the block with respect to one or more reference frames (369). When multiple reference frames are used, the multiple reference frames can be from different temporal directions or the same temporal direction. A motion-compensated prediction reference region is a region of samples in the reference frame(s) that are used to generate motion-compensated prediction values for a block of samples of a current frame. The motion estimator outputs motion information such as motion vector information, which is entropy coded. A motion compensator applies motion vectors to reference frames (369) to determine motion-compensated prediction values.

The encoder determines the differences (if any) between a block's prediction values (intra or inter) and corresponding original values. These prediction residual values are further encoded using a frequency transform, quantization and entropy encoding. For example, the encoder (340) sets values for quantization parameter (“QP”) for a picture, tile, slice and/or other portion of video, and quantizes transform coefficients accordingly. The entropy coder of the encoder (340) compresses quantized transform coefficient values as well as certain side information (e.g., motion vector information, BV values, QP values, mode decisions, parameter choices). Typical entropy coding techniques include Exp-Golomb coding, arithmetic coding, differential coding, Huffman coding, run length coding, variable-length-to-variable-length (“V2V”) coding, variable-length-to-fixed-length (“V2F”) coding, LZ coding, dictionary coding, probability interval partitioning entropy coding (“PIPE”), and combinations of the above. The entropy coder can use different coding techniques for different kinds of information, and can choose from among multiple code tables within a particular coding technique.

The coded frames (341) and MMCO/RPS information (342) are processed by a decoding process emulator (350). The decoding process emulator (350) implements some of the functionality of a decoder, for example, decoding tasks to reconstruct reference frames. The decoding process emulator (350) uses the MMCO/RPS information (342) to determine whether a given coded frame (341) needs to be reconstructed and stored for use as a reference frame in inter-frame prediction of subsequent frames to be encoded. If the MMCO/RPS information (342) indicates that a coded frame (341) needs to be stored, the decoding process emulator (350) models the decoding process that would be conducted by a decoder that receives the coded frame (341) and produces a corresponding decoded frame (351). In doing so, when the encoder (340) has used decoded frame(s) (369) that have been stored in the decoded frame storage area (360), the decoding process emulator (350) also uses the decoded frame(s) (369) from the storage area (360) as part of the decoding process.

The decoded frame temporary memory storage area (360) includes multiple frame buffer storage areas (361, 362, . . . , 36 n). The decoding process emulator (350) uses the MMCO/RPS information (342) to manage the contents of the storage area (360) in order to identify any frame buffers (361, 362, etc.) with frames that are no longer needed by the encoder (340) for use as reference frames. After modeling the decoding process, the decoding process emulator (350) stores a newly decoded frame (351) in a frame buffer (361, 362, etc.) that has been identified in this manner.

The coded frames (341) and MMCO/RPS information (342) are buffered in a temporary coded data area (370). The coded data that is aggregated in the coded data area (370) contains, as part of the syntax of an elementary coded video bitstream, encoded data for one or more pictures. The coded data that is aggregated in the coded data area (370) can also include media metadata relating to the coded video data (e.g., as one or more parameters in one or more supplemental enhancement information (“SEI”) messages or video usability information (“VUI”) messages).

The aggregated data (371) from the temporary coded data area (370) are processed by a channel encoder (380). The channel encoder (380) can packetize the aggregated data for transmission as a media stream (e.g., according to a media stream multiplexing format such as ISO/IEC 13818-1), in which case the channel encoder (380) can add syntax elements as part of the syntax of the media transmission stream. Or, the channel encoder (380) can organize the aggregated data for storage as a file (e.g., according to a media container format such as ISO/IEC 14496-12), in which case the channel encoder (380) can add syntax elements as part of the syntax of the media storage file. Or, more generally, the channel encoder (380) can implement one or more media system multiplexing protocols or transport protocols, in which case the channel encoder (380) can add syntax elements as part of the syntax of the protocol(s). The channel encoder (380) provides output to a channel (390), which represents storage, a communications connection, or another channel for the output.

IV. Example Decoder Systems.

FIG. 4 is a block diagram of an example decoder system (400) in conjunction with which some described embodiments may be implemented. The decoder system (400) can be a general-purpose decoding tool capable of operating in any of multiple decoding modes such as a low-latency decoding mode for real-time communication and regular decoding mode for media playback from a file or stream, or it can be a special-purpose decoding tool adapted for one such decoding mode. The decoder system (400) can be implemented as an operating system module, as part of an application library or as a standalone application. Overall, the decoder system (400) receives coded data from a channel (410) and produces reconstructed frames as output for an output destination (490). The coded data can include content encoded using intra BC prediction mode.

The decoder system (400) includes a channel (410), which can represent storage, a communications connection, or another channel for coded data as input. The channel (410) produces coded data that has been channel coded. A channel decoder (420) can process the coded data. For example, the channel decoder (420) de-packetizes data that has been aggregated for transmission as a media stream (e.g., according to a media stream multiplexing format such as ISO/IEC 13818-1), in which case the channel decoder (420) can parse syntax elements added as part of the syntax of the media transmission stream. Or, the channel decoder (420) separates coded video data that has been aggregated for storage as a file (e.g., according to a media container format such as ISO/IEC 14496-12), in which case the channel decoder (420) can parse syntax elements added as part of the syntax of the media storage file. Or, more generally, the channel decoder (420) can implement one or more media system demultiplexing protocols or transport protocols, in which case the channel decoder (420) can parse syntax elements added as part of the syntax of the protocol(s).

The coded data (421) that is output from the channel decoder (420) is stored in a temporary coded data area (430) until a sufficient quantity of such data has been received. The coded data (421) includes coded frames (431) and MMCO/RPS information (432). The coded data (421) in the coded data area (430) contain, as part of the syntax of an elementary coded video bitstream, coded data for one or more pictures. The coded data (421) in the coded data area (430) can also include media metadata relating to the encoded video data (e.g., as one or more parameters in one or more SEI messages or VUI messages).

In general, the coded data area (430) temporarily stores coded data (421) until such coded data (421) is used by the decoder (450). At that point, coded data for a coded frame (431) and MMCO/RPS information (432) are transferred from the coded data area (430) to the decoder (450). As decoding continues, new coded data is added to the coded data area (430) and the oldest coded data remaining in the coded data area (430) is transferred to the decoder (450).

The decoder (450) periodically decodes a coded frame (431) to produce a corresponding decoded frame (451). As appropriate, when performing its decoding process, the decoder (450) may use one or more previously decoded frames (469) as reference frames for inter-frame prediction. The decoder (450) reads such previously decoded frames (469) from a decoded frame temporary memory storage area (460). Generally, the decoder (450) includes multiple decoding modules that perform decoding tasks such as entropy decoding, inverse quantization, inverse frequency transforms, intra prediction, motion compensation and merging of tiles. The exact operations performed by the decoder (450) can vary depending on compression format.

For example, the decoder (450) receives encoded data for a compressed frame or sequence of frames and produces output including decoded frame (451). In the decoder (450), a buffer receives encoded data for a compressed frame and, at an appropriate time, makes the received encoded data available to an entropy decoder. The entropy decoder entropy decodes entropy-coded quantized data as well as entropy-coded side information, typically applying the inverse of entropy encoding performed in the encoder. A motion compensator applies motion information to one or more reference frames to form motion-compensated prediction values for any inter-coded blocks of the frame being reconstructed. An intra prediction module can spatially predict sample values of a current block from neighboring, previously reconstructed sample values or, for intra BC prediction, predict sample values of a current block using previously reconstructed sample values of an intra-prediction region in the frame. The decoder (450) also reconstructs prediction residuals. An inverse quantizer inverse quantizes entropy-decoded data. For example, the decoder (450) sets values for QP for a picture, tile, slice and/or other portion of video based on syntax elements in the bitstream, and inverse quantizes transform coefficients accordingly. An inverse frequency transformer converts the quantized, frequency domain data into spatial domain information. For an inter-predicted block, the decoder (450) combines reconstructed prediction residuals with motion-compensated predictions. The decoder (450) can similarly combine prediction residuals with predictions from intra prediction. A motion compensation loop in the video decoder (450) includes an adaptive de-blocking filter to smooth discontinuities across block boundary rows and/or columns in the decoded frame (451).

The decoded frame temporary memory storage area (460) includes multiple frame buffer storage areas (461, 462, . . . , 46 n). The decoded frame storage area (460) is an example of a decoded picture buffer. The decoder (450) uses the MMCO/RPS information (432) to identify a frame buffer (461, 462, etc.) in which it can store a decoded frame (451). The decoder (450) stores the decoded frame (451) in that frame buffer.

An output sequencer (480) uses the MMCO/RPS information (432) to identify when the next frame to be produced in output order is available in the decoded frame storage area (460). When the next frame (481) to be produced in output order is available in the decoded frame storage area (460), it is read by the output sequencer (480) and output to the output destination (490) (e.g., display). In general, the order in which frames are output from the decoded frame storage area (460) by the output sequencer (480) may differ from the order in which the frames are decoded by the decoder (450).

V. Example Video Encoders.

FIGS. 5a and 5b are a block diagram of a generalized video encoder (500) in conjunction with which some described embodiments may be implemented. The encoder (500) receives a sequence of video pictures including a current picture as an input video signal (505) and produces encoded data in a coded video bitstream (595) as output.

The encoder (500) is block-based and uses a block format that depends on implementation. Blocks may be further sub-divided at different stages, e.g., at the prediction, frequency transform and/or entropy encoding stages. For example, a picture can be divided into 64×64 blocks, 32×32 blocks or 16×16 blocks, which can in turn be divided into smaller blocks of sample values for coding and decoding. In implementations of encoding for the HEVC standard, the encoder partitions a picture into CTUs (CTBs), CUs (CBs), PUs (PBs) and TU (TBs).

The encoder (500) compresses pictures using intra-picture coding and/or inter-picture coding. Many of the components of the encoder (500) are used for both intra-picture coding and inter-picture coding. The exact operations performed by those components can vary depending on the type of information being compressed.

A tiling module (510) optionally partitions a picture into multiple tiles of the same size or different sizes. For example, the tiling module (510) splits the picture along tile rows and tile columns that, with picture boundaries, define horizontal and vertical boundaries of tiles within the picture, where each tile is a rectangular region. The tiling module (510) can then group the tiles into one or more tile sets, where a tile set is a group of one or more of the tiles.

The general encoding control (520) receives pictures for the input video signal (505) as well as feedback (not shown) from various modules of the encoder (500). Overall, the general encoding control (520) provides control signals (not shown) to other modules (such as the tiling module (510), transformer/scaler/quantizer (530), scaler/inverse transformer (535), intra-picture estimator (540), motion estimator (550) and intra/inter switch) to set and change coding parameters during encoding. In particular, the general encoding control (520) can decide whether and how to use intra BC prediction during encoding. The general encoding control (520) can also evaluate intermediate results during encoding, for example, performing rate-distortion analysis. The general encoding control (520) produces general control data (522) that indicates decisions made during encoding, so that a corresponding decoder can make consistent decisions. The general control data (522) is provided to the header formatter/entropy coder (590).

If the current picture is predicted using inter-picture prediction, a motion estimator (550) estimates motion of blocks of sample values of the current picture of the input video signal (505) with respect to one or more reference pictures. The decoded picture buffer (570) buffers one or more reconstructed previously coded pictures for use as reference pictures. When multiple reference pictures are used, the multiple reference pictures can be from different temporal directions or the same temporal direction. The motion estimator (550) produces as side information motion data (552) such as motion vector data and reference picture selection data. The motion data (552) is provided to the header formatter/entropy coder (590) as well as the motion compensator (555).

The motion compensator (555) applies motion vectors to the reconstructed reference picture(s) from the decoded picture buffer (570). The motion compensator (555) produces motion-compensated predictions for the current picture.

In a separate path within the encoder (500), an intra-picture estimator (540) determines how to perform intra-picture prediction for blocks of sample values of a current picture of the input video signal (505). The current picture can be entirely or partially coded using intra-picture coding. Using values of a reconstruction (538) of the current picture, for intra spatial prediction, the intra-picture estimator (540) determines how to spatially predict sample values of a current block of the current picture from neighboring, previously reconstructed sample values of the current picture. Or, for intra BC prediction, the intra-picture estimator (540) estimate displacement of the sample values of the current block to different candidate regions within the current picture. For intra BC prediction, the intra-prediction estimator (540) can constrain the BV selection process using one or more constraints described below. The intra-prediction estimator (540) can also limit use of intra BC prediction when constrained intra prediction is enabled, as described below.

The intra-prediction estimator (540) produces as side information intra prediction data (542), such as information indicating whether intra prediction uses spatial prediction or BC prediction (e.g., a flag value per intra block), prediction mode direction (for intra spatial prediction) and BV values (for intra BC prediction). The intra prediction data (542) is provided to the header formatter/entropy coder (590) as well as the intra-picture predictor (545).

According to the intra prediction data (542), the intra-picture predictor (545) spatially predicts sample values of a current block of the current picture from neighboring, previously reconstructed sample values of the current picture. Or, for intra BC prediction, the intra-picture predictor (545) predicts the sample values of the current block using previously reconstructed sample values of an intra-prediction region, which is indicated by a BV value for the current block. When the chroma data for a picture has the same resolution as the luma data (e.g. when the format is YUV 4:4:4 format or RGB 4:4:4 format), the BV value that is applied for the chroma block may be the same as the BV value applied for the luma block. On the other hand, when the chroma data for a picture has reduced resolution relative to the luma data (e.g. when the format is YUV 4:2:0 format), the BV value that is applied for the chroma block may be scaled down and possibly rounded to adjust for the difference in chroma resolution (e.g. by dividing the vertical and horizontal components of the BV value by two and truncating or rounding them to integer values).

The intra/inter switch selects values of a motion-compensated prediction or intra-picture prediction for use as the prediction (558) for a given block. The difference (if any) between a block of the prediction (558) and corresponding part of the original current picture of the input video signal (505) provides values of the residual (518). During reconstruction of the current picture, reconstructed residual values are combined with the prediction (558) to produce a reconstruction (538) of the original content from the video signal (505). In lossy compression, however, some information is still lost from the video signal (505).

In the transformer/scaler/quantizer (530), a frequency transformer converts spatial domain video information into frequency domain (i.e., spectral, transform) data. For block-based video coding, the frequency transformer applies a discrete cosine transform (“DCT”), an integer approximation thereof, or another type of forward block transform to blocks of prediction residual data (or sample value data if the prediction (558) is null), producing blocks of frequency transform coefficients. When intra BC prediction is used, the encoder (500) can apply a discrete sine transform (“DST”), an integer approximation thereof or other type of forward block transform (that is different than the transform applied for other blocks) for at least some sizes of blocks of intra BC prediction residual values, as described below. The encoder (500) may also be able to indicate that such transform step is skipped. The scaler/quantizer scales and quantizes the transform coefficients. For example, the quantizer applies non-uniform, scalar quantization to the frequency domain data with a step size that varies on a frame-by-frame basis, tile-by-tile basis, slice-by-slice basis, block-by-block basis or other basis. The quantized transform coefficient data (532) is provided to the header formatter/entropy coder (590).

In the scaler/inverse transformer (535), a scaler/inverse quantizer performs inverse scaling and inverse quantization on the quantized transform coefficients. An inverse frequency transformer performs an inverse frequency transform, producing blocks of reconstructed prediction residuals or sample values. The encoder (500) combines reconstructed residuals with values of the prediction (558) (e.g., motion-compensated prediction values, intra-picture prediction values) to form the reconstruction (538).

For intra-picture prediction, the values of the reconstruction (538) can be fed back to the intra-picture estimator (540) and intra-picture predictor (545). Also, the values of the reconstruction (538) can be used for motion-compensated prediction of subsequent pictures. The values of the reconstruction (538) can be further filtered. A filtering control (560) determines how to perform deblock filtering and sample adaptive offset (“SAO”) filtering on values of the reconstruction (538), for a given picture of the video signal (505). The filtering control (560) produces filter control data (562), which is provided to the header formatter/entropy coder (590) and merger/filter(s) (565).

In the merger/filter(s) (565), the encoder (500) merges content from different tiles into a reconstructed version of the picture. The encoder (500) selectively performs deblock filtering and SAO filtering according to the filter control data (562), so as to adaptively smooth discontinuities across boundaries in the frames. The encoder (500) can apply different approaches when in-loop deblock filtering the boundaries between blocks of a picture, depending on whether prediction mode is intra spatial prediction, intra BC prediction or inter prediction for the respective blocks, as described below. Tile boundaries can be selectively filtered or not filtered at all, depending on settings of the encoder (500), and the encoder (500) may provide syntax within the coded bitstream to indicate whether or not such filtering was applied. The decoded picture buffer (570) buffers the reconstructed current picture for use in subsequent motion-compensated prediction.

The header formatter/entropy coder (590) formats and/or entropy codes the general control data (522), quantized transform coefficient data (532), intra prediction data (542), motion data (552) and filter control data (562). For example, the header formatter/entropy coder (590) uses context-adaptive binary arithmetic coding for entropy coding of various syntax elements. In particular, when it encodes a BV value, the header formatter/entropy coder (590) can exploit the probabilities of occurrence of values for one component of the BV (e.g., horizontal component) considering the value of the other component of the BV (e.g., vertical component), as described below.

The header formatter/entropy coder (590) provides the encoded data in the coded video bitstream (595). The format of the coded video bitstream (595) can be a variation or extension of HEVC format, Windows Media Video format, VC-1 format, MPEG-x format (e.g., MPEG-1, MPEG-2, or MPEG-4), H.26x format (e.g., H.261, H.262, H.263, H.264), or another format.

Depending on implementation and the type of compression desired, modules of the encoder can be added, omitted, split into multiple modules, combined with other modules, and/or replaced with like modules. In alternative embodiments, encoders with different modules and/or other configurations of modules perform one or more of the described techniques. Specific embodiments of encoders typically use a variation or supplemented version of the encoder (500). The relationships shown between modules within the encoder (500) indicate general flows of information in the encoder, other relationships are not shown for the sake of simplicity.

VI. Example Video Decoders.

FIG. 6 is a block diagram of a generalized decoder (600) in conjunction with which several described embodiments may be implemented. The decoder (600) receives encoded data in a coded video bitstream (605) and produces output including pictures for reconstructed video (695). The format of the coded video bitstream (605) can be a variation or extension of HEVC format, Windows Media Video format, VC-1 format, MPEG-x format (e.g., MPEG-1, MPEG-2, or MPEG-4), H.26x format (e.g., H.261, H.262, H.263, H.264), or another format.

The decoder (600) is block-based and uses a block format that depends on implementation. Blocks may be further sub-divided at different stages. For example, a picture can be divided into 64×64 blocks, 32×32 blocks or 16×16 blocks, which can in turn be divided into smaller blocks of sample values. In implementations of decoding for the HEVC standard, a picture is partitioned into CTUs (CTBs), CUs (CBs), PUs (PBs) and TU (TBs).

The decoder (600) decompresses pictures using intra-picture decoding and/or inter-picture decoding. Many of the components of the decoder (600) are used for both intra-picture decoding and inter-picture decoding. The exact operations performed by those components can vary depending on the type of information being decompressed.

A buffer receives encoded data in the coded video bitstream (605) and makes the received encoded data available to the parser/entropy decoder (610). The parser/entropy decoder (610) entropy decodes entropy-coded data, typically applying the inverse of entropy coding performed in the encoder (500) (e.g., context-adaptive binary arithmetic decoding). In particular, when it decodes a BV value, the parser/entropy decoder (610) can decode the respective components of the BV as described below. As a result of parsing and entropy decoding, the parser/entropy decoder (610) produces general control data (622), quantized transform coefficient data (632), intra prediction data (642), motion data (652) and filter control data (662).

The general decoding control (620) receives the general control data (622) and provides control signals (not shown) to other modules (such as the scaler/inverse transformer (635), intra-picture predictor (645), motion compensator (655) and intra/inter switch) to set and change decoding parameters during decoding.

If the current picture is predicted using inter-picture prediction, a motion compensator (655) receives the motion data (652), such as motion vector data and reference picture selection data. The motion compensator (655) applies motion vectors to the reconstructed reference picture(s) from the decoded picture buffer (670). The motion compensator (655) produces motion-compensated predictions for inter-coded blocks of the current picture. The decoded picture buffer (670) stores one or more previously reconstructed pictures for use as reference pictures.

In a separate path within the decoder (600), the intra-prediction predictor (645) receives the intra prediction data (642), such as information indicating whether intra prediction uses spatial prediction or BC prediction (e.g., a flag value per intra block), prediction mode direction (for intra spatial prediction) and BV values (for intra BC prediction). For intra spatial prediction, using values of a reconstruction (638) of the current picture, according to prediction mode data, the intra-picture predictor (645) spatially predicts sample values of a current block of the current picture from neighboring, previously reconstructed sample values of the current picture. Or, for intra BC prediction, the intra-picture predictor (645) predicts the sample values of the current block using previously reconstructed sample values of an intra-prediction region, which is indicated by a BV value for the current block. The intra-picture predictor (645) can also limit use of intra BC prediction when constrained intra prediction is enabled, as described below.

The intra/inter switch selects values of a motion-compensated prediction or intra-picture prediction for use as the prediction (658) for a given block. For example, when HEVC syntax is followed, the intra/inter switch can be controlled based on a syntax element encoded for a CU of a picture that can contain intra-predicted CUs and inter-predicted CUs. The decoder (600) combines the prediction (658) with reconstructed residual values to produce the reconstruction (638) of the content from the video signal.

To reconstruct the residual, the scaler/inverse transformer (635) receives and processes the quantized transform coefficient data (632). In the scaler/inverse transformer (635), a scaler/inverse quantizer performs inverse scaling and inverse quantization on the quantized transform coefficients. An inverse frequency transformer performs an inverse frequency transform, producing blocks of reconstructed prediction residuals or sample values. For example, the inverse frequency transformer applies an inverse block transform to frequency transform coefficients, producing sample value data or prediction residual data. The inverse frequency transform can be an inverse DCT, an integer approximation thereof, or another type of inverse frequency transform. When intra BC prediction is used, the decoder (600) can apply an inverse DST, an integer approximation thereof or other type of inverse block transform (that is different than the transform applied for other blocks) for at least some sizes of blocks of intra BC prediction residual values, as described below.

For intra-picture prediction, the values of the reconstruction (638) can be fed back to the intra-picture predictor (645). For inter-picture prediction, the values of the reconstruction (638) can be further filtered. In the merger/filter(s) (665), the decoder (600) merges content from different tiles into a reconstructed version of the picture. The decoder (600) selectively performs deblock filtering and SAO filtering according to the filter control data (662) and rules for filter adaptation, so as to adaptively smooth discontinuities across boundaries in the frames. The decoder (600) can apply different approaches when in-loop deblock filtering the boundaries between blocks of a picture, depending on whether prediction mode is intra spatial prediction, intra BC prediction or inter prediction for the respective blocks, as described below. Tile boundaries can be selectively filtered or not filtered at all, depending on settings of the decoder (600) or a syntax indication within the encoded bitstream data. The decoded picture buffer (670) buffers the reconstructed current picture for use in subsequent motion-compensated prediction.

The decoder (600) can also include a post-processing deblock filter. The post-processing deblock filter optionally smoothes discontinuities in reconstructed pictures. Other filtering (such as de-ring filtering) can also be applied as part of the post-processing filtering.

Depending on implementation and the type of decompression desired, modules of the decoder can be added, omitted, split into multiple modules, combined with other modules, and/or replaced with like modules. In alternative embodiments, decoders with different modules and/or other configurations of modules perform one or more of the described techniques. Specific embodiments of decoders typically use a variation or supplemented version of the decoder (600). The relationships shown between modules within the decoder (600) indicate general flows of information in the decoder, other relationships are not shown for the sake of simplicity.

VII. Innovations for Intra Block Copy Prediction Mode.

This section presents various innovations for intra block copy (“BC”) prediction mode. Some of the innovations relate to selection of block vector (“BV”) values, while others relate to encoding/decoding of BV values. Still others relate to integration of intra BC prediction mode with constrained intra prediction, selection of forward and inverse frequency transforms when intra BC prediction mode has been used, or in-loop deblock filtering across a boundary of a block with intra BC prediction mode. These innovations can facilitate intra BC prediction that is more effective in terms of rate-distortion performance and/or computational efficiency of encoding and decoding. In particular, intra BC prediction can improve rate-distortion performance when encoding certain “artificially” created video content such as screen-capture content. Screen-capture content typically includes repeated structures (e.g., graphics, text characters), which provide opportunities for intra BC prediction to improve performance. Screen capture content is usually encoded in a format (e.g., YUV 4:4:4 or RGB 4:4:4) with high chroma sampling resolution, although it may also be encoded in a format with lower chroma sampling resolution (e.g., YUV 4:2:0).

A. Intra BC Prediction Mode—Introduction.

For intra BC prediction mode, the sample values of a current block of a picture are predicted using sample values in the same picture. A BV indicates a displacement from the current block to a region of the picture that includes the sample values used for prediction. Typically, the sample values used for prediction are previously reconstructed sample values. The BV is signaled in the bitstream. Intra BC prediction is a form of intra-picture prediction-intra BC prediction for a block of a picture does not use any sample values other than sample values in the same picture.

FIG. 7 illustrates intra BC prediction for a current block (730) of a current frame (710). The current block can be a coding block (“CB”) of a coding unit (“CU”), prediction block (“PB”) of a prediction unit (“PU”), transform block (“TB”) of a transform unit (“TU”) or other block. The size of the current block can be 64×64, 32×32, 16×16, 8×8 or some other size. More generally, the size of the current block is m×n, where each of m and n is a whole number, and where m and n can be equal to each other or can have different values. Alternatively, the current block can have some other shape (e.g., an area of a coded video object with a non-rectangular shape).

The BV (740) indicates a displacement (or offset) from the current block (730) to a region (750) of the picture that includes the sample values used for prediction. Suppose the top left position of a current block is at position (x₀, y₀) in the current frame, and suppose the top left position of the intra-prediction region is at position (x₁, y₁) in the current frame. The BV indicates the displacement (x₁−x₀, y₁−y₀). For example, if the top left position of the current block is at position (320, 256), and the top left position of the intra-prediction region is at position (295, 270), the BV value is (−25, 14). A negative horizontal displacement indicates a position to the left of the current block, and a negative vertical displacement indicates a position above the current block.

In some example implementations, the intra-predicted region (750) is constrained to be within the same slice and tile as the current block (730). Such intra BC prediction does not use sample values in other slices or tiles. The location of the intra-predicted region (750) may be subject to one or more other constraints (e.g., for search range, regarding use of reconstructed sample values of inter-coded blocks).

A block with prediction mode of intra BC prediction can be a CB, PB or other block. When the block is a CB, the BV for the block can be signaled at CU level (and other CBs in the CU use the same BV or a scaled version thereof). Or, when the block is a PB, the BV for the block can be signaled at PU level (and other PBs in the PU use the same BV or a scaled version thereof). More generally, the BV for an intra-BC prediction block is signaled at an appropriate syntax level for the block.

The block copying operations of prediction according to the intra BC prediction mode can be performed at the level of CB (when a BV is signaled per CB) or PB (when a BV is signaled per PB). For example, suppose a 16×16 CB has a single 16×16 PB. The BV (for the PB) is applied to block copy a 16×16 region. When the intra-prediction region is constrained to not overlap the 16×16 block being predicted, the BV has a magnitude (absolute value) of at least 16 horizontally or vertically.

Alternatively, the block copying operations can be performed at the level of TBs within a PB or CB, even when the BV is signaled for the PB or CB. In this way, a BV, as applied for a TB, can reference positions of other TBs in the same PB or CB. For example, suppose a 16×16 CB has a single 16×16 PB but is split into sixteen 4×4 TBs for purposes of residual coding/decoding. The BV (for the PB) is applied to block copy a 4×4 region for the first TB in raster scan order, then the same BV is applied to block copy a 4×4 region for the second TB in raster scan order, and so on. The 4×4 region used in the BC operations for a TB can include positions in previously reconstructed TBs in the same CB, after combining residual values with predicted values for those previously reconstructed TBs. (A BV still does not reference positions in the same TB that is being predicted). Applying BC operations at the TB level facilitates use of BVs with relatively small magnitudes.

Intra BC prediction operations for chroma blocks of a CU generally correspond to intra BC prediction operations for the luma block of the CU. Normally, the segmentation of chroma PBs and chroma TBs corresponds directly to the segmentation of the luma PBs and luma TBs in the CU. When the format of video is YUV 4:4:4, the sizes of chroma PBs and TBs match the sizes of corresponding luma PBs and TBs. When the format of video is YUV 4:2:0, chroma PBs and TBs are half the width and half the height of corresponding luma PBs and TBs. If a luma TB has minimum transform size, however, a single chroma TB having that minimum transform size is used.

In some implementations, for an intra BC predicted CU, intra BC prediction for a chroma block in a PU uses the same BV value as intra BC prediction for the luma block in the PU, possibly after scaling and rounding when the chroma data has reduced resolution relative to the luma data (e.g. when the format is YUV 4:2:0 format). Alternatively, different BV values can be signaled for the luma block and chroma blocks of a PU.

In some implementations, if the prediction mode of the luma block of a PU is intra BC prediction, the prediction mode for the chroma blocks of the PU is also intra BC predicted. For example, the prediction mode is signaled for the PU. Alternatively, the prediction mode can be intra BC prediction for the luma block or chroma blocks of the PU, but not both.

B. Constraining BV Search for Intra BC Prediction Mode.

In some example implementations, an encoder limits BV range according to one or more constraints. By limiting BV range, the area of reconstructed sample values that is referenced by fast memory access for intra BC prediction during encoding and decoding can be reduced, which tends to lower implementation cost.

FIG. 8 illustrates example constraints on search range for BV values. In addition to a current block (830) of a current frame (810), FIG. 8 shows a search range defined by two CTBs (820, 822). The current CTB (820) is part of the current CTU and includes the current block (830). With the CTB (822) to its left, the current CTB (820) defines a search range within which allowable BVs can be found for the current block (830). BVs (842, 844) reference regions that are outside the search range, so those BV values (842, 844) are not allowed.

In some example implementations, the search range for BV values for a current block is the current CTB and the CTB to its left. For example, a CTB can have size of 64×64, 32×32 or 16×16 sample values, which yields a search range of 128×64, 64×32 or 32×16 sample values. Only sample value in the current CTB and left CTB are used for intra BC prediction for the current block. This simplifies encoder implementation by constraining the search process. It also simplifies decoder implementation by limiting the number of sample values that the decoder buffers in fast memory for intra prediction. Another constraint is that intra prediction cannot reference sample values from another slice or tile. For a current m×n block with a top left position at (x₀, y₀) and CTB(s) each having dimensions CTB_(sizeY)x CTB_(sizeY), an encoder can check these constraints for a two-dimensional BV having a horizontal component BV[0] and vertical component BV[1] as follows.

-   -   BV[0]≥−((x₀% CTB_(sizeY))+CTB_(sizeY))     -   BV[1]≥−(y₀% CTB_(sizeY))     -   The sample values at positions (x₀, y₀), (x₀+BV[0], y₀+BV[1])         and (x₀+BV[0]+m−1, y₀+BV[1]+n−1) shall be in the same slice.     -   The sample values at positions (x₀,y₀), (x₀+BV[0], y₀+BV[1]) and         (x₀+BV[0]+m−1, y₀+BV[1]+n−1) shall be in the same tile.

FIG. 9 shows a technique (900) for encoding with an intra BC prediction mode, subject to one or more constraints on selection of BV values. An encoder such as one described with reference to FIG. 3 or FIGS. 5a-5b can perform the technique (900).

To start, the encoder determines (910) a BV for a current block of a picture. The current block can be a CB, PB or other block. The BV indicates a displacement to a region within the picture. In determining the BV, the encoder checks one or more constraints.

According to one possible constraint, the encoder checks range of sample values used for intra BC prediction. The encoder can check that a candidate intra-prediction region is within a range defined by a current CTB and one or more other CTBs (e.g., CTB to the left of the current CTB). For example, when the BV has a first component BV[0] and a second component BV[1], the current block has a top left position at position (x₀, y₀), and each of the CTB(s) has width CTB_(width) and height CTB_(height), the constraint is satisfied if BV[0]>=−((x₀% CTB_(width))+CTB_(width)) and BV[1]>=−(y₀% CTB_(height)). The encoder can similarly check upper limits on values of BV[0] and BV[1] within the search range: BV[0]<(CTB_(width)−m−(x₀% CTB_(width))) and BV[1]<(CTB_(height)−n−(y₀% CTB_(height))). Alternatively, the search range includes more or fewer CTBs, or the search range is defined in some other way.

According to another possible constraint, the encoder limits searching to the current slice and tile (i.e., the current block and region are part of no more than one slice of the picture and no more than one tile of the picture). The encoder can check that a top left position of the current block, a top left position of a candidate intra-prediction region and a bottom right position of the candidate intra-prediction region are part of a single slice and single tile. For example, the constraint is satisfied if (x₀, y₀), (x₀+BV[0], y₀+BV[1]) and (x₀+BV[0]+m−1, y₀+BV[1]+n−1) are part of a single slice and single tile.

Alternatively, the encoder checks other and/or additional constraints.

The encoder performs (920) intra BC prediction for the current block using the BV. For example, the encoder performs intra BC prediction for the entire current block. Or, the encoder performs intra BC prediction for multiple blocks associated with the current block (e.g., for multiple TBs on a TB-by-TB basis, where the TBs are associated with a current PB that has the BV).

The encoder encodes (930) the BV. For example, the encoder encodes (930) the BV as described below. The encoder can repeat the technique (900) for another intra BC prediction mode block.

For intra BC prediction, the encoder and decoder use reconstructed sample values. Unreconstructed sample values might be present as parts of a picture that have not been encoded and reconstructed yet. To avoid using unreconstructed sample values for intra BC prediction, the encoder can set constraints on allowable values of BV such that only actual, previously reconstructed sample values are used for intra BC prediction according to a BV.

In some example implementations, the encoder checks a BV value by considering the z-scan orders of the current block and the block that contains the bottom right position of the candidate intra-prediction region. More specifically, the encoder checks that the z-scan order of the block containing the position (x₀+BV[0]+m−1, y₀+BV[1]+n−1) is smaller than z-scan order of the block containing (x₀, y₀). If so, the block that contains the bottom right position of the intra-prediction region has been previously reconstructed (and hence so has the rest of the intra-prediction region). The BV also satisfies at least one of the conditions BV[0]+m<0 and BV[1]+n<0, ensuring that the intra-prediction region does not overlap the current block.

The z-scan order follows a sequentially specified ordering of blocks that partition a picture. FIG. 10 shows example z-scan order (1000) for a current block (1030) and blocks that might include the bottom right position of an intra-prediction region for a candidate BV. The current block (1030) can be a CB, PB or other block. The z-scan orders are generally assigned to blocks sequentially from left-to-right in a row, repeating in successive rows from top-to-bottom. When a block is split, z-scan orders are assigned within the split block, recursively. For implementations of encoding/decoding for the HEVC standard, the z-scan order proceeds CTB-to-CTB by a CTB raster scan pattern (left-to-right in a CTB row, repeating in successive CTB rows from top-to-bottom). If a CTB is split, the z-scan order follows a raster scan pattern for CBs of a quadtree within the split CTB. And, if a CB is split (e.g., into multiple CBs, or into multiple PBs), the z-scan order follows a raster scan pattern for blocks within the split CB.

Alternatively, to avoid using unreconstructed sample values for intra BC prediction the encoder (and decoder) can replace the unreconstructed sample values with default or otherwise determined values. FIGS. 11a and 11b show examples of intra-prediction regions with unreconstructed sample values to be replaced by fill-in values. In FIG. 11a , an intra-prediction region (1150) for the current block (1130) includes some sample values in a previously reconstructed row of blocks, but also includes unreconstructed sample values below that row. In FIG. 11b , an intra-prediction region (1152) includes some sample values in previously reconstructed blocks above the current block (1130) and to the left of the current block (1130) but also includes some unreconstructed sample values in the current block (1130). The encoder (and decoder) can fill unreconstructed sample values with a predefined value. For example, the predefined value is 128 (gray) for sample values that have a bit depth of 8. Or, the predefined value is another value. Or, instead of filling with a predefined value, unreconstructed sample values can be filled by horizontal or vertical expanding or interpolation, or by some other form of expanding or interpolation such as angular directional expanding, planar surface fitting expanding, or expanding using the average value of some available reconstructed sample values. In such a case, the encoder can still check constraints such that sample values not in the search range are not used for intra BC prediction. The encoder may also provide syntax information within the coded bitstream data to control the process of filling the unreconstructed sample values—such as by sending a constant value to be used, by sending an indicator of a prediction angle for angular directional expanding, or by sending an indicator to select between multiple methods of expanding.

During encoding, an encoder can fill unreconstructed sample values of an intra-prediction region with padded sample values (e.g., based upon interpolation within or extrapolation from actual reconstructed sample values) or fill-in sample values having a predefined value (e.g., gray value) as part of the intra BC prediction process. During decoding, in the same way, a decoder can fill unreconstructed sample values of an intra-prediction region with padded sample values or fill-in sample values having a predefined value as part of the intra BC prediction process.

Alternatively, when intra BC prediction can be performed on a TB-by-TB basis (see section G), the encoder and decoder can check for possible overlap between an intra-prediction region and a current block (TB), then use the results of the check to decide whether the current TB should be split into smaller TBs for application of intra BC prediction operations. Suppose a current TB has a size of m×n, where m and n can be equal to each other or can have different values. If BV[0]>−m and BV[1]>−n, the intra-prediction region overlaps the current m×n TB, which is problematic unless the current m×n TB is split into smaller TBs for application of intra BC prediction operations. Thus, if BV[0]>−m and BV[1]>−n, the encoder and decoder split the current TB into smaller TBs. The same condition is checked (e.g., checked recursively) for the smaller TBs, which may be further split if BV[0]>−m and BV[1]>−n even for the smaller values of m and n after splitting.

For example, suppose the BV for a PB is (−9, −5), and the current TB is a 32×32 block. The encoder and decoder determine that −9>−32 and −5>−32, indicating that the intra-prediction region (whose top left corner is displaced −9, −5) would overlap the current 32×32 TB. The encoder and decoder split the 32×32 TB into four 16×16 TBs. For each of the 16×16 TBs, the encoder and decoder determine that −9>−16 and −5>−16, indicating that the intra-prediction region (whose top left corner is displaced −9, −5) would overlap the current 16×16 TB. The encoder and decoder split each 16×16 TB, in succession, into four 8×8 TBs. For an 8×8 TB, the BV of (−9, −5) is not problematic, so the 8×8 TB is not forced to be further split.

In this scenario, when a TB is split due to a BV value and size of the TB, the encoder can skip signaling of the flag value that would otherwise signal whether to split the current TB into smaller TBs. The bitstream of encoded data lacks the flag value directing the decoder to split the current TB into smaller TBs. Instead, the decoder can infer that a TB should be split due to a BV value and the size of the TB. This can save bits that would otherwise be spent signaling information about splitting TBs.

C. Intra BC Prediction Mode if Constrained Intra Prediction is Enabled.

In some example implementations, how intra BC prediction is performed depends on whether constrained intra prediction is enabled. Constrained intra prediction is a setting used to control resilience to errors that may be introduced into encoded video data (e.g., due to packet losses or bit flips from interference). Constrained intra prediction limits which reconstructed sample values can be used for intra prediction. When constrained intra prediction is enabled, reconstructed sample values from inter-coded blocks cannot be used for intra BC prediction or intra spatial prediction. A flag in the bitstream can indicate whether constrained intra prediction is enabled.

FIG. 12 shows a technique (1200) for using intra BC prediction mode when constrained intra prediction can be enabled. An encoder such as one described with reference to FIG. 3 or FIGS. 5a-5b can perform the technique (1200). Or, a decoder such as one described with reference to FIG. 4 or FIG. 6 can perform the technique (1200).

The encoder or decoder determines (1210) whether constrained intra prediction is enabled. For example, the encoder or decoder checks the value of a flag that controls whether constrained intra prediction is enabled. The flag can be signaled as part of a picture parameter set or at some other level.

The encoder or decoder (1220) performs intra BC prediction for a current block, depending at least in part on whether constrained intra prediction is enabled. There are several approaches to adjusting intra BC prediction depending on whether constrained intra prediction is enabled, as detailed below. The encoder or decoder can repeat the technique (1200) for another intra BC prediction mode block.

In one approach, when an encoder determines a BV for the current block, if constrained intra prediction is enabled, the encoder checks that no sample value of the candidate intra-prediction region is a reconstructed sample value from an inter-coded block. If constrained intra prediction is not enabled, the constraint does not apply, and intra BC prediction can use reconstructed sample values from an inter-coded block.

FIG. 13 illustrates this constraint on allowable BV values when constrained intra prediction is enabled. BVs (1342, 1344) for intra-prediction regions in intra-coded blocks are allowed, whether the blocks were encoded using intra spatial prediction or intra BC prediction. BVs (1346, 1348) for intra-prediction regions that are entirely or partially in an inter-coded block are not allowed. For example, if constrained intra prediction is enabled, when determining a BV for a current block, the encoder checks that any sample value p[x][y] of the candidate intra-prediction region is within an intra-coded block. That is, for a current m×n block with a top left position at position (x₀, y₀), the encoder checks this condition for all p[x][y] with x=x₀+BV[0] . . . x0+BV[0]+m−1 and y=y₀+BV[1] . . . y₀+BV[1]+n−1.

Another approach uses fill-in sample values in place of reconstructed sample values of an inter-coded block if constrained intra prediction is enabled. If constrained intra prediction is enabled, intra BC prediction includes determining a fill-in sample value or padded sample value (by extrapolation or interpolation) in place of any sample value of the intra-prediction region that is a reconstructed sample value from an inter-coded block.

In still another approach, if constrained intra prediction is enabled, intra BC prediction is disabled in non-intra slices. Intra BC prediction is still allowed for intra slices (which have only intra-coded content) and for non-intra slices when constrained intra prediction is not enabled. FIG. 14 illustrates this approach. In FIG. 14, a condition in a syntax table (1400) indicates presence or absence of intra_bc_flag syntax elements used for intra BC prediction. Even if intra BC prediction is enabled (intra_block_copy enabled flag is 1), an intra BC flag is signaled only if the current slice is an intra slice (slice type is I) or constrained intra prediction is not enabled (constrained_intra_pred_flag is 0).

D. Encoding and Decoding of BV Values.

In some example implementations, two-dimensional BV values are encoded efficiently by exploiting probabilities of occurrence of values for a first component given a value for a second component.

FIGS. 15a and 15b show example ranges of BV values having properties that can be exploited in encoding. In FIGS. 15a and 15b , a BV is found for a current m×n block (1530). The BV has a horizontal component BV[0] and a vertical component BV[1]. Intra BC prediction is constrained to only use actual reconstructed sample values. (Alternatives in which other BV values, referencing unreconstructed sample values, are allowed are addressed at the end of this section.)

Because intra BC prediction only uses actual reconstructed sample values, BV values in the range where BV[0]>−m and BV[1]>−n are not allowable. In this range, candidate intra-prediction regions will have at least some unreconstructed sample values.

As shown in FIG. 15a , when BV[1]<−n, BV[0] can have a positive or negative value. When BV[1]>−n, however, the allowable BVs have BV[0]≤S−m (assuming intra BC prediction is constrained to only use actual reconstructed sample values). The horizontal component of the BV can be adjusted by an offset value. This improves coding efficiency in typical entropy coding schemes because values closer to zero are encoded using fewer bits. For example, instead of directly coding BV[0], the horizontal component is coded as DV[0]=BV[0]+m. The DV[0] value is closer to 0 than BV[0], and typically is encoded using fewer bits. When DV[0] is decoded from the bitstream, BV[0] can be reconstructed as DV[0]−m. Specifically, the BV is reconstructed as follows. First, BV[1] is decoded. If BV[1]>−n, then BV[0]=D[0]−m. Otherwise (when BV[1]≤−n), BV[0]=DV[0].

Similarly, as shown in FIG. 15b , when BV[0]≤—m, BV[1] can have a positive or negative value. When BV[0]>−m, however, the allowable BVs have BV[0]≤−n (assuming intra BC prediction is constrained to only use actual reconstructed sample values). The vertical component of the BV can be adjusted by an offset value, for example, as DV[1]=BV[1]+n. When DV[1] is decoded from bitstream, BV[1] can be reconstructed as DV[1]−n.

Alternatively, instead of being based on a dimension m or n of the current block, the offset value can be set in the bitstream (e.g., in a sequence parameter set, picture parameter set or slice header) or given a predefined value. For example, the offset value can be set to 8, 16 or some other value. Adjusted BV component values will still be closer to zero than they would otherwise be, in most cases.

FIG. 16 shows a technique (1600) for encoding BV values. An encoder such as one described with reference to FIG. 3 or FIGS. 5a-5b can perform the technique (1600).

The encoder determines (1610) a two-dimensional BV for a current block of a picture. The BV has a first component and a second component. For example, the encoder searches for the BV in a search range subject to one or more constraints, as described above. The encoder performs (1620) intra BC prediction for the current block using the BV. For example, the encoder performs intra BC prediction for the entire current block. Or, the encoder performs intra BC prediction for multiple blocks associated with the current block (e.g., for multiple TBs on a TB-by-TB basis, where the TBs are associated with a current PB that has the BV).

The encoder encodes (1630) the BV. The encoding of the BV exploits probabilities of occurrence of values for the first component given a value for the second component. In some implementations, the encoding of a value for the first BV component depends on the value for the second BV component. The encoder can compare the value for the second component to a first offset value, then selectively adjust the value for the first component using a second offset value. For example, the first component is a horizontal component BV[0], the second component is a vertical component BV[1], and the current block is an m×n block. The first offset value depends on n and the second offset value depends on m. If the value for the vertical component BV[1] is greater than −n, the value for the horizontal component BV[0] is increased by m. After this adjustment, the encoding of the BV can include binary arithmetic coding or another form of entropy coding.

The encoder can repeat the technique (1600) for another intra BC prediction mode block.

FIG. 17 shows a technique (1700) for decoding BV values. A decoder such as one described with reference to FIG. 4 or FIG. 6 can perform the technique (1700).

The decoder decodes (1710) a two-dimensional BV for a current block of a picture. The BV has a first component and a second component. The decoder reverses encoding of the BV that exploits probabilities of occurrence of values for the first component given a value for the second component. The decoding of the BV can include binary arithmetic decoding or another form of entropy decoding.

After the binary arithmetic decoding or other entropy decoding, the value for the first BV component is adjusted. In some implementations, the decoding of a value for the first BV component depends on the value for the second BV component. The decoder can compare the value for the second component to a first offset value, then selectively adjust the value for the first component using a second offset value. For example, the first component is a horizontal component BV[0], the second component is a vertical component BV[1], and the current block is an m×n block. The first offset value depends on n and the second offset value depends on m. If the value for the vertical component BV[1] is greater than −n, the value for the horizontal component BV[0] is reduced by m.

The decoder performs (1720) intra BC prediction for the current block using the BV. For example, the decoder performs intra BC prediction for the entire current block. Or, the decoder performs intra BC prediction for multiple blocks associated with the current block (e.g., for multiple TBs on a TB-by-TB basis, where the TBs are associated with a current PB that has the BV). The decoder can repeat the technique (1700) for another intra BC prediction mode block.

Alternatively, for the techniques (1600, 1700) illustrated in FIGS. 16 and 17, the first component is a vertical component BV[1], the second component is a horizontal component BV[0], the first offset value depends on m and the second offset value depends on n. If the value for the horizontal component BV[0] is greater than −m, the value for the vertical component BV[1] is increased by n (during encoding) or reduced by n (during decoding).

Or, for the techniques (1600, 1700) illustrated in FIGS. 16 and 17, the first component and the second component can be jointly coded in a way that exploits absence of codes for at least some combinations of the first component and the second component. For example, the encoder and decoder use a variable length code table with codes absent for combinations of the first component and the second component that are in the range bordering the current block.

If BV values that reference intra-prediction regions with unreconstructed sample values are allowed, the encoder and decoder can still adjust a BV component value. For example, the encoder adjusts the value for one of the BV components to bring it closer to zero, on average, considering the value of the other BV component. The adjusted value of BV component may have a positive value, but it is more likely to be closer to zero and hence encoded using fewer bits.

In example implementations, intra BC prediction uses integer values for BV. Fractional displacements (and fractional interpolation between reconstructed sample values) are not used. Alternatively, BVs can have fractional displacements.

Alternatively, when search range is constrained, the encoding and decoding of BV values can use modulo wrapping. If the component of a BV value indicates a position outside of the search range, the component “wraps around” to the opposite side of the search range and continues from there. This can make it more efficient to encode extreme values of displacements. For example, if a positive displacement greater than x would result in a BV[0] value that points outside the search range, a displacement of x for BV[0] could be used to indicate an extreme negative value at the opposite side of the search range.

Aside from entropy coding/decoding of BV values that includes use of offset values (as described above), an encoder and decoder can use BV prediction and/or merge mode/BV competition when encoding/decoding BV values.

For basic BV prediction during encoding and decoding, the BV value for a current block can be predicted based on the BV values of one or more previous blocks. The BV value of a neighboring block (e.g., block left of the current block) can be used to determine a BV predictor for the BV value of the current block. Or, the BV predictor for the BV value of the current block can be the component-wise median or average of the BV values of multiple neighboring blocks (e.g., blocks to the left, above and above-left of the current block). During encoding, a BV difference is determined using the BV value and BV predictor, and the BV difference is encoded. During decoding, the reconstructed BV difference is combined with the BV predictor.

Or, an encoder and decoder determine one or more candidate BV values for a current block among the BV values used for reconstructed blocks that spatially neighbor the current block (e.g., block to the left of the current block, block above the current block, and so on). The candidate BV value(s) can also include one or more BV values used for reconstructed blocks that temporally neighbor the current block, where a temporally neighboring block is at a corresponding position as the current block in another picture (e.g., same position or overlapping position). The list of candidate BV value(s) is determined by rules during encoding and decoding to eliminate redundant BV values. During encoding, the encoder can signal one or more syntax elements indicating which of the candidate BV value(s) to use as the BV predictor for the current block. In some modes, that BV predictor can be used as the BV value for the current block, which effectively “merges” the BV value of the current block with the BV value the neighbor providing the candidate BV value. Or, the encoder can determine and encode a BV difference based on the BV value and BV predictor. When a BV difference is signaled, the selection of the BV predictor can happen automatically (without signaling of syntax elements to select a candidate BV value). During decoding, the decoder can receive one or more syntax elements indicating which of the candidate BV value(s) to use as the BV predictor for the current block. In some modes, that BV predictor can be used as the BV value for the current block, which effectively “merges” the BV value of the current block with the BV value the neighbor providing the candidate BV value. Or, the decoder can receive and decode a BV difference, which the decoder combines with the BV predictor to reconstruct the BV value. When a BV difference is signaled, the selection of the BV predictor can happen automatically (without signaling of syntax elements to select a candidate BV value). A BV “skip” or BV “direct” mode can be provided in which the BV predictor (selected by rule) is used as the BV value of the current block, with no residual values signaled for the current block.

E. Forward and Inverse Transforms for Intra BC Prediction Mode Blocks.

When intra BC prediction is used, in some example implementations, certain sizes of luma residual blocks are encoded using a discrete sine transform (“DST”), or integer approximation thereof, and decoded using an inverse DST, or integer approximation thereof. In particular, DST (or integer approximation thereof) and inverse DST (or integer approximation thereof) are used for 4×4 luma blocks of residual values from intra BC prediction. More generally, when intra BC prediction is used, the encoder uses a first type of forward transform (“regular” transform) for some sizes of luma blocks of residual values from intra BC prediction and for chroma blocks, and the decoder uses a first type of inverse transform (“regular inverse transform) for such blocks. For other sizes of luma blocks of residual values, however, the encoder uses a second type of forward transform (“alternative” transform), and the decoder uses a second type of inverse transform (“alternative” inverse transform).

FIG. 18 shows a generalized technique (1800) for encoding using an intra BC prediction mode and alternative transforms. An encoder such as one described with reference to FIG. 3 or FIGS. 5a-5b can perform the technique (1800).

The encoder predicts (1810) sample values using intra BC prediction mode, then determines (1820) residual values based on the predicted sample values and original sample values.

The encoder checks (1825) whether special blocks (e.g., luma blocks with a special size) are being encoded. If so, the encoder applies (1832) an alternative forward transform to the residual values to produce transform coefficients, which are quantized and entropy coded (1840). For example, the encoder applies a DST, integer approximation thereof or other type of forward transform to 4×4 luma blocks of residual values from intra BC prediction. Otherwise, the encoder applies (1830) a regular forward transform to the residual values to produce transform coefficients, which are quantized and entropy coded (1840). For example, the encoder applies a DCT, integer approximation thereof or other type of forward transform to other sizes of blocks of residual values from intra BC prediction and to chroma blocks. The encoder can repeat the technique (1800) for another intra BC prediction mode block.

FIG. 19 shows a generalized technique (1900) for decoding using an intra BC prediction mode and alternative inverse transforms. A decoder such as one described with reference to FIG. 4 or FIG. 6 can perform the technique (1900).

The decoder entropy decodes and inverse quantizes (1910) transform coefficients. The decoder checks (1915) whether special blocks (e.g., luma blocks with a special size) are being decoded. If so, the decoder applies (1922) an alternative inverse transform to the transform coefficients to produce residual values. For example, the decoder applies an inverse DST, integer approximation thereof or other type of inverse transform to transform coefficients for 4×4 luma blocks of residual values from intra BC prediction. Otherwise, the decoder applies (1920) a regular inverse transform to transform coefficients. For example, the encoder applies an inverse DCT, integer approximation thereof or other type of inverse transform to other sizes of blocks from intra BC prediction and to chroma blocks. The decoder predicts (1930) sample values using intra BC prediction mode. The decoder combines (1940) the residual values and the predicted sample values to reconstruct sample values. The decoder can repeat the technique (1900) for another intra BC prediction mode block.

F. In-Loop Deblock Filing for Intra BC Prediction Mode Blocks.

In some example implementations, deblock filtering across a boundary between blocks depends on prediction mode of the blocks (e.g., intra spatial prediction, intra BC prediction or inter prediction). Also, in some example implementations, deblock filtering across a boundary between intra BC prediction blocks adapts depending on BV values.

In general, a deblocking filter is selectively applied to sample values adjacent a block boundary for a block (e.g., PB, TB). Special rules may apply to disable or alter filtering at a picture boundary, slice boundary or tile boundary. The encoder or decoder sets a strength for the deblock filtering depending on various factors, including prediction mode (intra spatial, intra BC prediction, inter), reference index values and motion vector values (for inter-coded blocks), BV values (for intra BC predicted blocks) and presence/absence of non-zero transform coefficients.

For example, suppose blocks P and Q are adjacent blocks with a common boundary. If one or both of the blocks P and Q has prediction mode of intra spatial prediction, the filtering strength has a first value (e.g., indicating strongest filtering). On the other hand, if the blocks P and Q are both inter-coded, both intra BC predicted, or one inter-coded and one intra BC predicted, then the filtering strength has another value (e.g., indicating moderate filtering or indicating no filtering).

If both of blocks P and Q are inter-coded, the filtering strength value that indicates moderate filtering is assigned if: (a) either block has any non-zero transform coefficients, (b) reference index values for the two blocks are not equal, (c) motion vector values for the two blocks are not equal, or (d) the difference between the two motion vector components for either block is greater than a threshold amount (e.g., one sample). Otherwise (no condition satisfied), the filtering strength value that indicates no filtering is assigned.

If both of blocks P and Q are intra BC predicted, the filtering strength value that indicates moderate filtering is assigned if: (a) either block has any non-zero transform coefficients, (b) BV values for the two blocks are not equal, or (c) the difference between BV components for either block is greater than a threshold amount (e.g., one sample). Otherwise (no condition satisfied), the filtering strength value that indicates no filtering is assigned.

If one of blocks P and Q is inter-coded and the other is intra BC predicted, the filtering strength value that indicates moderate filtering is assigned if (a) either block has any non-zero transform coefficients. Otherwise, the filtering strength value that indicates no filtering is assigned. Alternatively, if one of blocks P and Q is inter-coded and the other is intra BC predicted, the filtering strength can have the first value (e.g., indicating strongest filtering).

For strong and moderate filtering, the filtering can be further adjusted depending on quantization parameter values or other considerations. Alternatively, filtering strength is assigned and/or adjusted according to other rules.

FIG. 20 shows example rules (2000) for changing an approach to in-loop deblock filtering depending on prediction modes of blocks. If either of two adjacent blocks has prediction mode of intra spatial prediction, for the boundary between the blocks, the encoder or decoder applies a first approach to deblock filtering (e.g., strong filtering). Otherwise, if prediction mode for one of the two blocks is inter prediction and prediction mode for the other is intra BC prediction, the encoder or decoder applies a second approach to deblock filtering (e.g., moderate filtering or no filtering depending on presence/absence of non-zero transform coefficient levels). Otherwise, if prediction mode for both of the two blocks is intra BC prediction, the encoder or decoder applies a third approach to deblock filtering (e.g., moderate filtering or no filtering depending on presence/absence of non-zero transform coefficient levels and depending on BV values). Otherwise (prediction mode for both blocks is inter prediction; not shown in FIG. 20), the encoder or decoder applies a fourth approach to deblock filtering (e.g., moderate filtering or no filtering depending on presence/absence of non-zero transform coefficient levels, reference index values and motion vector values). For all approaches, the filtering can be further adjusted depending on quantization parameter values or other considerations.

FIG. 21 shows a technique (2100) for in-loop deblock filtering for a block having intra BC prediction mode. An encoder such as one described with reference to FIG. 3 or FIGS. 5a-5b can perform the technique (2100). Or, a decoder such as one described with reference to FIG. 4 or FIG. 6 can perform the technique (2100).

The encoder or decoder reconstructs (2110) first and second blocks of a picture, which includes at least some blocks with prediction mode of intra BC prediction.

The encoder or decoder performs in-loop deblock filtering across a boundary between the first and second blocks. As part of the in-loop deblock filtering, the encoder or decoder determines (2120) prediction mode for each of the first and second blocks and uses (2130) an approach to deblock filtering that depends at least in part on prediction mode. In particular, if the prediction mode for both of the first and second blocks is intra BC prediction, the encoder or decoder adjusts the in-loop deblock filtering based at least in part on values of BVs for the first and second blocks, respectively.

The encoder or decoder can repeat the technique (2100) for other block boundaries in the picture.

With regard to the timing of deblock filtering (and other in-loop operations such as SAO filtering) relative to intra BC prediction, in some implementations intra BC prediction operations precede any deblock filtering and SAO filtering operations to be applied for previous parts of a picture. For example, the intra BC prediction operations can use stored copies of sample values before application of the filtering processes. This eliminates the need to synchronize filtering processes with intra BC prediction processes. It also prevents indirect dependencies on sample values outside of a slice, tile, etc. (or within an inter-coded block, when constrained intra prediction is enabled) when filtering uses such sample values.

Alternatively, intra BC prediction operations follow any deblock filtering and SAO filtering operations to be applied for previous parts of a picture. This can require synchronization of filtering and prediction operations, and can create dependencies on sample values in another slice, tile, etc. On the other hand, using filtered sample values for intra BC prediction may provide for efficient compression in terms of rate-distortion performance.

G. Example Implementation Combining Features of Intra BC Prediction.

As noted, the preceding features of intra BC prediction can be used separately and individually. Or, the preceding features of intra BC prediction can be used can be used in combination.

For example, in one combined implementation that generally follows HEVC syntax, a BV value is signaled for a PU (which can be a CU, or part of a CU). The PU can include one or more TUs. Intra BC prediction processes operate at the level of TBs, on a TB-by-TB basis, using the BV value signaled for the PU. (All TBs use the same BV value, and intra BC prediction for a current TB can use reconstructed sample values of other, earlier TBs in the same CU). The BV value can be predicted using the BV values of one or more neighboring PUs. Whether or not BV prediction is used, the BV value (or BV difference value) can be encoded in a manner that accounts for allowable BV values (e.g., by taking account of horizontal/vertical allowed values or by using modulo wrapping when encoding the BV value). The selection of BV values is constrained: (a) such that the encoder is prohibited from selecting BV values that would cause any sample values to be referenced that lie within areas that have not yet been encoded/reconstructed (i.e., the sample values of an intra-prediction region for a current TB must be in areas covered by other TBs that precede the current TB in decoding/bitstream order; that is, for a given TB, the BV value is constrained to reference a region that is outside of the TB); (b) to reduce the necessary memory capacity in the decoder (e.g., by constraining references according to BV values to be within the current CTB and one or two CTBs to the left of the current CTB); (c) to prohibit references according to BV values from being outside the current slice, outside the current tile or outside the picture; and (d) when constrained intra prediction is enabled, to prohibit the encoder from using BV values that would reference sample values that used inter-picture prediction.

In view of the many possible embodiments to which the principles of the disclosed invention may be applied, it should be recognized that the illustrated embodiments are only preferred examples of the invention and should not be taken as limiting the scope of the invention. Rather, the scope of the invention is defined by the following claims. We therefore claim as our invention all that comes within the scope and spirit of these claims. 

We claim:
 1. In a computing system that implements a video decoder, a method comprising: receiving encoded data in a bitstream for at least part of a video sequence; and decoding the encoded data, including reconstructing first and second blocks of a picture of the video sequence, each of the first and second blocks having a prediction mode, and performing in-loop deblock filtering across a boundary between the first and second blocks, wherein the performing the in-loop deblock filtering includes: checking if the prediction mode for at least one of the first and second blocks is intra spatial prediction mode and, if so, assigning a filtering strength value that indicates strong filtering; otherwise, the prediction mode for each of the first and second blocks being intra block copy (“BC”) prediction mode or inter prediction mode, assigning a filtering strength value that indicates moderate filtering or a filtering strength value that indicates no filtering according to an approach that depends at least in part on the prediction modes of the first and second blocks, respectively, wherein: a first approach is applied when the prediction mode for one of the first and second blocks is the intra BC prediction mode and the prediction mode for the other of the first and second blocks is the inter prediction mode; and a second approach, different than the first approach, is applied when the prediction mode for both of the first and second blocks is the intra BC prediction mode; and a third approach, different than the first and second approaches, is applied when the prediction mode for both of the first and second blocks is the inter prediction mode.
 2. The method of claim 1, wherein: the first approach includes checking presence/absence of non-zero transform coefficients for the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients.
 3. The method of claim 2, wherein the first and second blocks are transform blocks associated with one or more coding units.
 4. The method of claim 1, wherein: the second approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks and/or (b) a value of a block vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients or if a difference between vector components of the values of the block vectors for the first and second blocks is greater than a threshold amount.
 5. The method of claim 4, wherein the first and second blocks are transform blocks associated with one or more coding units, and wherein the block vectors for the first and second blocks are signaled for prediction units associated with the one or more coding units.
 6. The method of claim 1, wherein: the third approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks, (b) reference index values for the first and second blocks, and/or (c) a value of a motion vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients, if the reference index values for the first and second blocks are different, or if a difference between vector components of the values of the motion vectors for the first and second blocks is greater than a threshold amount.
 7. The method of claim 6, wherein the first and second blocks are transform blocks associated with one or more coding units, and wherein the motion vectors for the first and second blocks are signaled for prediction units associated with the one or more coding units.
 8. The method of claim 1, wherein, according to the first approach, the second approach, and the third approach, the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients.
 9. One or more computer-readable media having stored thereon encoded data in a bitstream for at least part of a video sequence, the one or more computer-readable media being selected from the group consisting of non-volatile memory, magnetic disk, CD-ROM, and DVD, the encoded data being organized to facilitate decoding by operations comprising: reconstructing first and second blocks of a picture of the video sequence, each of the first and second blocks having a prediction mode; and performing in-loop deblock filtering across a boundary between the first and second blocks, wherein the performing the in-loop deblock filtering includes: checking if the prediction mode for at least one of the first and second blocks is intra spatial prediction mode and, if so, assigning a filtering strength value that indicates strong filtering; otherwise, the prediction mode for each of the first and second blocks being intra block copy (“BC”) prediction mode or inter prediction mode, assigning a filtering strength value that indicates moderate filtering or a filtering strength value that indicates no filtering according to an approach that depends at least in part on the prediction modes of the first and second blocks, respectively, wherein: a first approach is applied when the prediction mode for one of the first and second blocks is the intra BC prediction mode and the prediction mode for the other of the first and second blocks is the inter prediction mode; and a second approach, different than the first approach, is applied when the prediction mode for both of the first and second blocks is the intra BC prediction mode; and a third approach, different than the first and second approaches, is applied when the prediction mode for both of the first and second blocks is the inter prediction mode.
 10. The one or more computer-readable media of claim 9, wherein: the first approach includes checking presence/absence of non-zero transform coefficients for the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients.
 11. The one or more computer-readable media of claim 9, wherein: the second approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks and/or (b) a value of a block vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients or if a difference between vector components of the values of the block vectors for the first and second blocks is greater than a threshold amount.
 12. The one or more computer-readable media of claim 9, wherein: the third approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks, (b) reference index values for the first and second blocks, and/or (c) a value of a motion vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients, if the reference index values for the first and second blocks are different, or if a difference between vector components of the values of the motion vectors for the first and second blocks is greater than a threshold amount.
 13. A computing system comprising memory and one or more processing units, wherein the computing system implements a video encoder configured to perform operations comprising: receiving a picture of a video sequence; encoding the picture to produce encoded data, including reconstructing first and second blocks of the picture, each of the first and second blocks having a prediction mode, and performing in-loop deblock filtering across a boundary between the first and second blocks, wherein the performing the in-loop deblock filtering includes: checking if the prediction mode for at least one of the first and second blocks is intra spatial prediction mode and, if so, assigning a filtering strength value that indicates strong filtering; otherwise, the prediction mode for each of the first and second blocks being intra block copy (“BC”) prediction mode or inter prediction mode, assigning a filtering strength value that indicates moderate filtering or a filtering strength value that indicates no filtering according to an approach that depends at least in part on the prediction modes of the first and second blocks, respectively, wherein: a first approach is applied when the prediction mode for one of the first and second blocks is the intra BC prediction mode and the prediction mode for the other of the first and second blocks is the inter prediction mode; and a second approach, different than the first approach, is applied when the prediction mode for both of the first and second blocks is the intra BC prediction mode; and a third approach, different than the first and second approaches, is applied when the prediction mode for both of the first and second blocks is the inter prediction mode; and outputting, as part of a bitstream, the encoded data.
 14. The computing system of claim 13, wherein: the first approach includes checking presence/absence of non-zero transform coefficients for the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients.
 15. The computing system of claim 14, wherein the first and second blocks are transform blocks associated with one or more coding units.
 16. The computing system of claim 13, wherein: the second approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks and/or (b) a value of a block vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients or if a difference between vector components of the values of the block vectors for the first and second blocks is greater than a threshold amount.
 17. The computing system of claim 16, wherein the first and second blocks are transform blocks associated with one or more coding units, and wherein the block vectors for the first and second blocks are signaled for prediction units associated with the one or more coding units.
 18. The computing system of claim 13, wherein: the third approach includes checking (a) presence/absence of non-zero transform coefficients for the first and second blocks, (b) reference index values for the first and second blocks, and/or (c) a value of a motion vector for each of the first and second blocks; and the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients, if the reference index values for the first and second blocks are different, or if a difference between vector components of the values of the motion vectors for the first and second blocks is greater than a threshold amount.
 19. The computing system of claim 18, wherein the first and second blocks are transform blocks associated with one or more coding units, and wherein the motion vectors for the first and second blocks are signaled for prediction units associated with the one or more coding units.
 20. The computing system of claim 13, wherein, according to the first approach, the second approach, and the third approach, the filtering strength value that indicates moderate filtering is assigned if either of the first and second blocks includes any non-zero transform coefficients. 